home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
develop, the CD; issue 1
/
Apple_Develop_1989.bin
/
Realistic Color
/
RW Fragment
/
RW Fragment.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-10-05
|
804b
|
40 lines
/* Real World QD code fragment */
/* Test for Color QD and 32-Bit QD */
/* If Color QD and 32-BitQD are present, then nothing happens in the demo. */
/* If they are missing, you get a window with the message. */
#define QD32Trap 0xAB03
#define UnImplTrap 0xA89F
#define False 0
#define True 1
PutUpInformativeMessage()
{
printf("\n 32-Bit QuickDraw is not implemented.");
}
QD32Exists()
{
short error;
Boolean result = False; /* Assume not there */
SysEnvRec theWorld;
error = SysEnvirons (1, &theWorld);
if (theWorld.hasColorQD)
result = (NGetTrapAddress (QD32Trap, ToolTrap) !=
NGetTrapAddress (UnImplTrap, ToolTrap));
return result;
}
main()
{
Boolean QD32IsImplemented;
QD32IsImplemented = QD32Exists();
if (!QD32IsImplemented)
PutUpInformativeMessage();
}